package com.community.domain.exception;

import lombok.Data;

/**
 * 类名称： MyException
 * 描述：
 * 创建人：zyj
 * 创建时间：2023/11/7 13:05
 */
@Data
public class MyException  extends RuntimeException{

        private String msg;
        private int code = 500;

        public MyException(String msg) {
            super(msg);
            this.msg = msg;
        }

        public MyException(String msg, Throwable e) {
            super(msg, e);
            this.msg = msg;
        }

        public MyException(String msg, int code) {
            super(msg);
            this.msg = msg;
            this.code = code;
        }

        public MyException(String msg, int code, Throwable e) {
            super(msg, e);
            this.msg = msg;
            this.code = code;
        }


}
